package com.example.demo;

import com.baomidou.mybatisplus.extension.api.IErrorCode;

/**
 * 错误代码
 *
 * @author zhaiding
 */
public enum ErrorCode implements IErrorCode {

    DESERIALIZE(1000, "信息数据格式不正确"),
    PARAM(1001, "入参未通过验证")


    ;

    private long code;
    private String msg;

    ErrorCode(final long code, final String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public long getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
